package zhtt.action07_ParentPackage;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.convention.annotation.ParentPackage;

import java.io.IOException;

/**
 * Created by zhtt on 2017/4/19.
 */
@ParentPackage(value="struts-default")
public class Demo01Action extends ActionSupport {

    @Override
    public String execute() throws Exception {
        try {
            ServletActionContext.getResponse().getOutputStream().write("Hello".getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
}
